<%@ page import="jakarta.servlet.http.HttpSession" %>
<%@ page import="jakarta.servlet.http.Cookie" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>退出登录中。。。</title>
</head>
<body>
<%
    HttpSession session1= request.getSession(false);
    if (session1!=null){
        session1.invalidate();
        Cookie cookie=new Cookie("uname",null);
        cookie.setMaxAge(0);
        cookie.setPath("/");
        response.addCookie(cookie);
        Cookie cookie1=new Cookie("uid",null);
        cookie1.setMaxAge(0);
        cookie1.setPath("/");
        response.addCookie(cookie1);
        response.setHeader("refresh", "0;URL=login.jsp");
    }
%>
</body>
</html>
